package fr.afcepf.atod18.commande.web;

import javax.faces.bean.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

import fr.afcepf.atod18.commande.entity.EtatCommande;
import fr.afcepf.atod18.commande.service.IGestionEtatCommande;

@Named
@SessionScoped
public class CreerEtatCommandeMB {
	
	@Inject
	private IGestionEtatCommande gestionEtatCommande;
	
	private int id;
	private String libelle;
	
	public String doAffichageEtatCommande() {
		
		return null;
	}
	public String doCreerEtatCommande() {
		EtatCommande etatCommande = new EtatCommande(libelle);
		gestionEtatCommande.ajouter(etatCommande);
		return null;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public IGestionEtatCommande getGestionEtatCommande() {
		return gestionEtatCommande;
	}
	public void setGestionEtatCommande(IGestionEtatCommande gestionEtatCommande) {
		this.gestionEtatCommande = gestionEtatCommande;
	}
	public String getLibelle() {
		return libelle;
	}
	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
	
}
